package com.ruoyi.cust.service.impl;

import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cust.mapper.CityApplyMapper;
import com.ruoyi.cust.domain.CityApply;
import com.ruoyi.cust.service.ICityApplyService;

/**
 * 合作申请Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-06
 */
@Service
public class CityApplyServiceImpl implements ICityApplyService {
    @Autowired
    private CityApplyMapper cityApplyMapper;

    /**
     * 查询合作申请
     *
     * @param applyId 合作申请主键
     * @return 合作申请
     */
    @Override
    public CityApply selectCityApplyByApplyId(Long applyId) {
        return cityApplyMapper.selectCityApplyByApplyId(applyId);
    }

    /**
     * 查询合作申请列表
     *
     * @param cityApply 合作申请
     * @return 合作申请
     */
    @Override
    public List<CityApply> selectCityApplyList(CityApply cityApply) {
        return cityApplyMapper.selectCityApplyList(cityApply);
    }

    /**
     * 新增合作申请
     *
     * @param cityApply 合作申请
     * @return 结果
     */
    @Override
    public int insertCityApply(CityApply cityApply) {
                cityApply.setCreateTime(DateUtils.getNowDate());
            return cityApplyMapper.insertCityApply(cityApply);
    }

    /**
     * 修改合作申请
     *
     * @param cityApply 合作申请
     * @return 结果
     */
    @Override
    public int updateCityApply(CityApply cityApply) {
        return cityApplyMapper.updateCityApply(cityApply);
    }

    /**
     * 批量删除合作申请
     *
     * @param applyIds 需要删除的合作申请主键
     * @return 结果
     */
    @Override
    public int deleteCityApplyByApplyIds(Long[] applyIds) {
        return cityApplyMapper.deleteCityApplyByApplyIds(applyIds);
    }

    /**
     * 删除合作申请信息
     *
     * @param applyId 合作申请主键
     * @return 结果
     */
    @Override
    public int deleteCityApplyByApplyId(Long applyId) {
        return cityApplyMapper.deleteCityApplyByApplyId(applyId);
    }
}
